#include <stdio.h>

struct person {
    char *name;
    int age;
    char *work;

    void printInfo() {
        printf("name = %s, age = %d, work = %s\n", name, age, work);
    }
};

int main(int argc, char **argv) {

    struct person persons[] = {
            {"zhangsan", 10, "teacher"},
            {"lisi", 16, "doctor"},
    };

    for (int i = 0; i < 2; ++i) {
        persons[i].printInfo();
    }

    return 0;
}
